
Last chance! 50% off unlimited learning
Sale ends in
frequency(x) <- value
frequency<-
is a generic function for replacing (or assigning)
the frequency of an object. Currently, there is a "zooreg"
and
a "zoo"
method. In both cases, the value
is assigned
to the "frequency"
of the object if it complies with the
index(x)
.zooreg
, index
z <- zooreg(1:5)
z
as.ts(z)
frequency(z) <- 3
z
as.ts(z)
Run the code above in your browser using DataLab